package com.moon.interface_api.service.serviceImpl;

import com.moon.interface_api.service.ThreadService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class ThreadServiceImpl implements ThreadService {
    
    
    
    
    @Override
    @Async("asyncServiceExecutor")
    public String test() {
        System.out.println(Thread.currentThread().getName()+"-----》开始运行service");
        try {
            Thread.sleep(4000);
        }catch (Exception e){
            System.out.println(e.getMessage());
        }
        System.out.println(Thread.currentThread().getName()+"------》结束运行service");
        return "11111";
    }
}
